package com.baor.controller;

import com.baor.dao.TypeDao;

import com.baor.domain.TypeVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class HelloController {
    @Autowired
    private TypeDao typeDao;
    @RequestMapping(value = "/hello")
    public String hello(@Value("${msg}") String msg) {
        List<TypeVO> typeVos = this.typeDao.selectList(null);
        typeVos.forEach(System.out::println);
        return "success" + msg;
    }
}